3.11.99 \(\int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx\) [1099]

Optimal. Leaf size=354 \[ \frac {\left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right ) x}{4 a^2 (c-i d)^3 (c+i d)^5}-\frac {2 d^3 \left (5 c^2-5 i c d-2 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (i c-d)^5 (i c+d)^3 f}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c-i d) (c+i d)^3 f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))} \]

[Out]

1/4*(c^5+5*I*c^4*d-10*c^3*d^2+30*I*c^2*d^3+45*c*d^4-15*I*d^5)*x/a^2/(c-I*d)^3/(c+I*d)^5-2*d^3*(5*c^2-5*I*c*d-2
*d^2)*ln(c*cos(f*x+e)+d*sin(f*x+e))/a^2/(I*c-d)^5/(I*c+d)^3/f+1/4*d*(c^2+5*I*c*d+8*d^2)/a^2/(c-I*d)/(c+I*d)^3/
f/(c+d*tan(f*x+e))^2+1/4*(I*c-5*d)/a^2/(c+I*d)^2/f/(1+I*tan(f*x+e))/(c+d*tan(f*x+e))^2-1/4/(I*c-d)/f/(a+I*a*ta
n(f*x+e))^2/(c+d*tan(f*x+e))^2+1/4*(c-3*I*d)*d*(c^2+8*I*c*d+5*d^2)/a^2/(c-I*d)^2/(c+I*d)^4/f/(c+d*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]
time = 0.53, antiderivative size = 354, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3640, 3677, 3610, 3612, 3611} \begin {gather*} \frac {d (c-3 i d) \left (c^2+8 i c d+5 d^2\right )}{4 a^2 f (c-i d)^2 (c+i d)^4 (c+d \tan (e+f x))}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 f (c-i d) (c+i d)^3 (c+d \tan (e+f x))^2}-\frac {2 d^3 \left (5 c^2-5 i c d-2 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 f (-d+i c)^5 (d+i c)^3}+\frac {x \left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right )}{4 a^2 (c-i d)^3 (c+i d)^5}+\frac {-5 d+i c}{4 a^2 f (c+i d)^2 (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^3),x]

[Out]

((c^5 + (5*I)*c^4*d - 10*c^3*d^2 + (30*I)*c^2*d^3 + 45*c*d^4 - (15*I)*d^5)*x)/(4*a^2*(c - I*d)^3*(c + I*d)^5)
- (2*d^3*(5*c^2 - (5*I)*c*d - 2*d^2)*Log[c*Cos[e + f*x] + d*Sin[e + f*x]])/(a^2*(I*c - d)^5*(I*c + d)^3*f) + (
d*(c^2 + (5*I)*c*d + 8*d^2))/(4*a^2*(c - I*d)*(c + I*d)^3*f*(c + d*Tan[e + f*x])^2) + (I*c - 5*d)/(4*a^2*(c +
I*d)^2*f*(1 + I*Tan[e + f*x])*(c + d*Tan[e + f*x])^2) - 1/(4*(I*c - d)*f*(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e
 + f*x])^2) + ((c - (3*I)*d)*d*(c^2 + (8*I)*c*d + 5*d^2))/(4*a^2*(c - I*d)^2*(c + I*d)^4*f*(c + d*Tan[e + f*x]
))

Rule 3610

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b
*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3611

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c/(b*f))
*Log[RemoveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rule 3612

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c +
b*d)*(x/(a^2 + b^2)), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3640

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*(b*c - a*d))), x] + Dist[1/(2*a*m*(b*c - a*d))
, Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*c*m - a*d*(2*m + n + 1) + b*d*(m + n + 1)*Tan
[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2
+ d^2, 0] && LtQ[m, 0] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3677

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*
f*m*(b*c - a*d))), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rubi steps

\begin {align*} \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx &=-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {\int \frac {-2 a (i c-3 d)-4 i a d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^3} \, dx}{4 a^2 (i c-d)}\\ &=\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {\int \frac {-2 a^2 \left (c^2+5 i c d-16 d^2\right )-6 a^2 (c+5 i d) d \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx}{8 a^4 (c+i d)^2}\\ &=\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {\int \frac {-2 a^2 \left (c^3+5 i c^2 d-13 c d^2+15 i d^3\right )-4 a^2 d \left (c^2+5 i c d+8 d^2\right ) \tan (e+f x)}{(c+d \tan (e+f x))^2} \, dx}{8 a^4 (c+i d)^2 \left (c^2+d^2\right )}\\ &=\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))}-\frac {\int \frac {-2 a^2 \left (c^4+5 i c^3 d-11 c^2 d^2+25 i c d^3+16 d^4\right )-2 a^2 d \left (c^3+5 i c^2 d+29 c d^2-15 i d^3\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{8 a^4 (c+i d)^2 \left (c^2+d^2\right )^2}\\ &=\frac {\left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^3}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))}-\frac {\left (2 d^3 \left (5 c^2-5 i c d-2 d^2\right )\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^2 (c+i d)^2 \left (c^2+d^2\right )^3}\\ &=\frac {\left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^3}-\frac {2 d^3 \left (5 c^2-5 i c d-2 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c+i d)^2 \left (c^2+d^2\right )^3 f}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(4395\) vs. \(2(354)=708\).
time = 8.17, size = 4395, normalized size = 12.42 \begin {gather*} \text {Result too large to show} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^3),x]

[Out]

(Sec[e + f*x]^2*(5*c^2*d^3*Cos[e] - (5*I)*c*d^4*Cos[e] - 2*d^5*Cos[e] + (5*I)*c^2*d^3*Sin[e] + 5*c*d^4*Sin[e]
- (2*I)*d^5*Sin[e])*((-2*I)*ArcTan[(-2*c*d*Cos[f*x] - c^2*Sin[f*x] + d^2*Sin[f*x])/(c^2*Cos[f*x] - d^2*Cos[f*x
] - 2*c*d*Sin[f*x])]*Cos[e] + 2*ArcTan[(-2*c*d*Cos[f*x] - c^2*Sin[f*x] + d^2*Sin[f*x])/(c^2*Cos[f*x] - d^2*Cos
[f*x] - 2*c*d*Sin[f*x])]*Sin[e])*(Cos[f*x] + I*Sin[f*x])^2)/((c - I*d)^3*(c + I*d)^5*f*(a + I*a*Tan[e + f*x])^
2) + (Sec[e + f*x]^2*(5*c^2*d^3*Cos[e] - (5*I)*c*d^4*Cos[e] - 2*d^5*Cos[e] + (5*I)*c^2*d^3*Sin[e] + 5*c*d^4*Si
n[e] - (2*I)*d^5*Sin[e])*(-(Cos[e]*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]) - I*Log[(c*Cos[e + f*x] + d*Sin[e
 + f*x])^2]*Sin[e])*(Cos[f*x] + I*Sin[f*x])^2)/((c - I*d)^3*(c + I*d)^5*f*(a + I*a*Tan[e + f*x])^2) + (x*Sec[e
 + f*x]^2*(((-10*I)*c^2*d^3*Cos[e])/((c - I*d)^3*(c + I*d)^4*(c*Cos[e] + d*Sin[e])) - (10*c*d^4*Cos[e])/((c -
I*d)^3*(c + I*d)^4*(c*Cos[e] + d*Sin[e])) + ((4*I)*d^5*Cos[e])/((c - I*d)^3*(c + I*d)^4*(c*Cos[e] + d*Sin[e]))
 + (10*c^2*d^3*Sin[e])/((c - I*d)^3*(c + I*d)^4*(c*Cos[e] + d*Sin[e])) - ((10*I)*c*d^4*Sin[e])/((c - I*d)^3*(c
 + I*d)^4*(c*Cos[e] + d*Sin[e])) - (4*d^5*Sin[e])/((c - I*d)^3*(c + I*d)^4*(c*Cos[e] + d*Sin[e])) + ((2*Cos[2*
e] + (2*I)*Sin[2*e])*((5*I)*c^3*d^3 + (3*I)*c*d^5 + 2*d^6 - (5*I)*c^3*d^3*Cos[2*e] - 10*c^2*d^4*Cos[2*e] + (7*
I)*c*d^5*Cos[2*e] + 2*d^6*Cos[2*e] + 5*c^3*d^3*Sin[2*e] - (10*I)*c^2*d^4*Sin[2*e] - 7*c*d^5*Sin[2*e] + (2*I)*d
^6*Sin[2*e]))/((c - I*d)^3*(c + I*d)^5*(c + I*d + c*Cos[2*e] - I*d*Cos[2*e] + I*c*Sin[2*e] + d*Sin[2*e])))*(Co
s[f*x] + I*Sin[f*x])^2)/(a + I*a*Tan[e + f*x])^2 + (Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*(Cos[2*e + 4*f*x]
/64 - (I/64)*Sin[2*e + 4*f*x])*((6*I)*c^8*Cos[e] - 14*c^7*d*Cos[e] + (18*I)*c^6*d^2*Cos[e] - 42*c^5*d^3*Cos[e]
 + (18*I)*c^4*d^4*Cos[e] - 42*c^3*d^5*Cos[e] + (6*I)*c^2*d^6*Cos[e] - 14*c*d^7*Cos[e] + (5*I)*c^8*Cos[e + 2*f*
x] - 11*c^7*d*Cos[e + 2*f*x] + (31*I)*c^6*d^2*Cos[e + 2*f*x] - 33*c^5*d^3*Cos[e + 2*f*x] + (63*I)*c^4*d^4*Cos[
e + 2*f*x] - 33*c^3*d^5*Cos[e + 2*f*x] + (53*I)*c^2*d^6*Cos[e + 2*f*x] - 11*c*d^7*Cos[e + 2*f*x] + (16*I)*d^8*
Cos[e + 2*f*x] + 2*c^8*f*x*Cos[e + 2*f*x] + (16*I)*c^7*d*f*x*Cos[e + 2*f*x] - 56*c^6*d^2*f*x*Cos[e + 2*f*x] -
(32*I)*c^5*d^3*f*x*Cos[e + 2*f*x] - 20*c^4*d^4*f*x*Cos[e + 2*f*x] + (80*I)*c^3*d^5*f*x*Cos[e + 2*f*x] - 120*c^
2*d^6*f*x*Cos[e + 2*f*x] - 30*d^8*f*x*Cos[e + 2*f*x] + (5*I)*c^8*Cos[3*e + 2*f*x] - 3*c^7*d*Cos[3*e + 2*f*x] +
 (43*I)*c^6*d^2*Cos[3*e + 2*f*x] + 35*c^5*d^3*Cos[3*e + 2*f*x] - (25*I)*c^4*d^4*Cos[3*e + 2*f*x] + 127*c^3*d^5
*Cos[3*e + 2*f*x] - (111*I)*c^2*d^6*Cos[3*e + 2*f*x] + 89*c*d^7*Cos[3*e + 2*f*x] - (48*I)*d^8*Cos[3*e + 2*f*x]
 + 2*c^8*f*x*Cos[3*e + 2*f*x] + (12*I)*c^7*d*f*x*Cos[3*e + 2*f*x] - 28*c^6*d^2*f*x*Cos[3*e + 2*f*x] + (52*I)*c
^5*d^3*f*x*Cos[3*e + 2*f*x] + (100*I)*c^3*d^5*f*x*Cos[3*e + 2*f*x] + 60*c^2*d^6*f*x*Cos[3*e + 2*f*x] + (60*I)*
c*d^7*f*x*Cos[3*e + 2*f*x] + 30*d^8*f*x*Cos[3*e + 2*f*x] + (2*I)*c^8*Cos[3*e + 4*f*x] - 2*c^7*d*Cos[3*e + 4*f*
x] + (22*I)*c^6*d^2*Cos[3*e + 4*f*x] + 18*c^5*d^3*Cos[3*e + 4*f*x] + (110*I)*c^4*d^4*Cos[3*e + 4*f*x] + 10*c^3
*d^5*Cos[3*e + 4*f*x] + (130*I)*c^2*d^6*Cos[3*e + 4*f*x] - 10*c*d^7*Cos[3*e + 4*f*x] + (40*I)*d^8*Cos[3*e + 4*
f*x] + 4*c^8*f*x*Cos[3*e + 4*f*x] + (24*I)*c^7*d*f*x*Cos[3*e + 4*f*x] - 56*c^6*d^2*f*x*Cos[3*e + 4*f*x] + (104
*I)*c^5*d^3*f*x*Cos[3*e + 4*f*x] + (200*I)*c^3*d^5*f*x*Cos[3*e + 4*f*x] + 120*c^2*d^6*f*x*Cos[3*e + 4*f*x] + (
120*I)*c*d^7*f*x*Cos[3*e + 4*f*x] + 60*d^8*f*x*Cos[3*e + 4*f*x] + (2*I)*c^8*Cos[5*e + 4*f*x] + 2*c^7*d*Cos[5*e
 + 4*f*x] + (22*I)*c^6*d^2*Cos[5*e + 4*f*x] + 62*c^5*d^3*Cos[5*e + 4*f*x] - (130*I)*c^4*d^4*Cos[5*e + 4*f*x] -
 74*c^3*d^5*Cos[5*e + 4*f*x] - (126*I)*c^2*d^6*Cos[5*e + 4*f*x] - 134*c*d^7*Cos[5*e + 4*f*x] + (24*I)*d^8*Cos[
5*e + 4*f*x] + 4*c^8*f*x*Cos[5*e + 4*f*x] + (16*I)*c^7*d*f*x*Cos[5*e + 4*f*x] - 16*c^6*d^2*f*x*Cos[5*e + 4*f*x
] + (176*I)*c^5*d^3*f*x*Cos[5*e + 4*f*x] + 280*c^4*d^4*f*x*Cos[5*e + 4*f*x] - (80*I)*c^3*d^5*f*x*Cos[5*e + 4*f
*x] + 240*c^2*d^6*f*x*Cos[5*e + 4*f*x] - (240*I)*c*d^7*f*x*Cos[5*e + 4*f*x] - 60*d^8*f*x*Cos[5*e + 4*f*x] + (8
0*I)*c^4*d^4*Cos[5*e + 6*f*x] + 112*c^3*d^5*Cos[5*e + 6*f*x] + (48*I)*c^2*d^6*Cos[5*e + 6*f*x] + 112*c*d^7*Cos
[5*e + 6*f*x] - (32*I)*d^8*Cos[5*e + 6*f*x] + 2*c^8*f*x*Cos[5*e + 6*f*x] + (8*I)*c^7*d*f*x*Cos[5*e + 6*f*x] -
8*c^6*d^2*f*x*Cos[5*e + 6*f*x] + (88*I)*c^5*d^3*f*x*Cos[5*e + 6*f*x] + 140*c^4*d^4*f*x*Cos[5*e + 6*f*x] - (40*
I)*c^3*d^5*f*x*Cos[5*e + 6*f*x] + 120*c^2*d^6*f*x*Cos[5*e + 6*f*x] - (120*I)*c*d^7*f*x*Cos[5*e + 6*f*x] - 30*d
^8*f*x*Cos[5*e + 6*f*x] + 2*c^8*f*x*Cos[7*e + 6*f*x] + (4*I)*c^7*d*f*x*Cos[7*e + 6*f*x] + 4*c^6*d^2*f*x*Cos[7*
e + 6*f*x] + (92*I)*c^5*d^3*f*x*Cos[7*e + 6*f*x] + 320*c^4*d^4*f*x*Cos[7*e + 6*f*x] - (500*I)*c^3*d^5*f*x*Cos[
7*e + 6*f*x] - 420*c^2*d^6*f*x*Cos[7*e + 6*f*x] + (180*I)*c*d^7*f*x*Cos[7*e + 6*f*x] + 30*d^8*f*x*Cos[7*e + 6*
f*x] + (6*I)*c^7*d*Sin[e] - 14*c^6*d^2*Sin[e] + (18*I)*c^5*d^3*Sin[e] - 42*c^4*d^4*Sin[e] + (18*I)*c^3*d^5*Sin
[e] - 42*c^2*d^6*Sin[e] + (6*I)*c*d^7*Sin[e] - ...

________________________________________________________________________________________

Maple [A]
time = 1.01, size = 304, normalized size = 0.86 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/f/a^2*(1/8*(-I*c^2+31*I*d^2+8*c*d)/(c+I*d)^5*ln(tan(f*x+e)-I)-1/4*(I*c^2-I*d^2-2*c*d)/(c+I*d)^5/(tan(f*x+e)-
I)^2-1/4*(-8*I*c*d-c^2+7*d^2)/(c+I*d)^5/(tan(f*x+e)-I)-1/8*I/(I*d-c)^3*ln(tan(f*x+e)+I)+2*d^3*(I*c^2*d+I*d^3-2
*c^3-2*c*d^2)/(I*d-c)^3/(c+I*d)^5/(c+d*tan(f*x+e))-1/2*d^3*(c^4+2*c^2*d^2+d^4)/(I*d-c)^3/(c+I*d)^5/(c+d*tan(f*
x+e))^2-2*d^3*(5*I*c*d-5*c^2+2*d^2)/(I*d-c)^3/(c+I*d)^5*ln(c+d*tan(f*x+e)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 918 vs. \(2 (312) = 624\).
time = 1.21, size = 918, normalized size = 2.59 \begin {gather*} \frac {i \, c^{7} - c^{6} d + 3 i \, c^{5} d^{2} - 3 \, c^{4} d^{3} + 3 i \, c^{3} d^{4} - 3 \, c^{2} d^{5} + i \, c d^{6} - d^{7} + 4 \, {\left (c^{7} + 3 i \, c^{6} d - c^{5} d^{2} + 85 i \, c^{4} d^{3} + 235 \, c^{3} d^{4} - 271 i \, c^{2} d^{5} - 147 \, c d^{6} + 31 i \, d^{7}\right )} f x e^{\left (8 i \, f x + 8 i \, e\right )} - 4 \, {\left (-i \, c^{7} - 11 i \, c^{5} d^{2} - 20 \, c^{4} d^{3} + 45 i \, c^{3} d^{4} - 8 \, c^{2} d^{5} + 55 i \, c d^{6} + 12 \, d^{7} - 2 \, {\left (c^{7} + 5 i \, c^{6} d - 9 \, c^{5} d^{2} + 75 i \, c^{4} d^{3} + 75 \, c^{3} d^{4} + 39 i \, c^{2} d^{5} + 85 \, c d^{6} - 31 i \, d^{7}\right )} f x\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (9 i \, c^{7} - 13 \, c^{6} d + 71 i \, c^{5} d^{2} + 5 \, c^{4} d^{3} - 45 i \, c^{3} d^{4} + 305 \, c^{2} d^{5} + 85 i \, c d^{6} + 95 \, d^{7} + 4 \, {\left (c^{7} + 7 i \, c^{6} d - 21 \, c^{5} d^{2} + 45 i \, c^{4} d^{3} - 45 \, c^{3} d^{4} + 69 i \, c^{2} d^{5} - 23 \, c d^{6} + 31 i \, d^{7}\right )} f x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left (-3 i \, c^{7} + 7 \, c^{6} d - 9 i \, c^{5} d^{2} + 21 \, c^{4} d^{3} - 9 i \, c^{3} d^{4} + 21 \, c^{2} d^{5} - 3 i \, c d^{6} + 7 \, d^{7}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - 32 \, {\left ({\left (5 \, c^{4} d^{3} - 15 i \, c^{3} d^{4} - 17 \, c^{2} d^{5} + 9 i \, c d^{6} + 2 \, d^{7}\right )} e^{\left (8 i \, f x + 8 i \, e\right )} + 2 \, {\left (5 \, c^{4} d^{3} - 5 i \, c^{3} d^{4} + 3 \, c^{2} d^{5} - 5 i \, c d^{6} - 2 \, d^{7}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (5 \, c^{4} d^{3} + 5 i \, c^{3} d^{4} + 3 \, c^{2} d^{5} + i \, c d^{6} + 2 \, d^{7}\right )} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{16 \, {\left ({\left (a^{2} c^{10} + 5 \, a^{2} c^{8} d^{2} + 10 \, a^{2} c^{6} d^{4} + 10 \, a^{2} c^{4} d^{6} + 5 \, a^{2} c^{2} d^{8} + a^{2} d^{10}\right )} f e^{\left (8 i \, f x + 8 i \, e\right )} + 2 \, {\left (a^{2} c^{10} + 2 i \, a^{2} c^{9} d + 3 \, a^{2} c^{8} d^{2} + 8 i \, a^{2} c^{7} d^{3} + 2 \, a^{2} c^{6} d^{4} + 12 i \, a^{2} c^{5} d^{5} - 2 \, a^{2} c^{4} d^{6} + 8 i \, a^{2} c^{3} d^{7} - 3 \, a^{2} c^{2} d^{8} + 2 i \, a^{2} c d^{9} - a^{2} d^{10}\right )} f e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (a^{2} c^{10} + 4 i \, a^{2} c^{9} d - 3 \, a^{2} c^{8} d^{2} + 8 i \, a^{2} c^{7} d^{3} - 14 \, a^{2} c^{6} d^{4} - 14 \, a^{2} c^{4} d^{6} - 8 i \, a^{2} c^{3} d^{7} - 3 \, a^{2} c^{2} d^{8} - 4 i \, a^{2} c d^{9} + a^{2} d^{10}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/16*(I*c^7 - c^6*d + 3*I*c^5*d^2 - 3*c^4*d^3 + 3*I*c^3*d^4 - 3*c^2*d^5 + I*c*d^6 - d^7 + 4*(c^7 + 3*I*c^6*d -
 c^5*d^2 + 85*I*c^4*d^3 + 235*c^3*d^4 - 271*I*c^2*d^5 - 147*c*d^6 + 31*I*d^7)*f*x*e^(8*I*f*x + 8*I*e) - 4*(-I*
c^7 - 11*I*c^5*d^2 - 20*c^4*d^3 + 45*I*c^3*d^4 - 8*c^2*d^5 + 55*I*c*d^6 + 12*d^7 - 2*(c^7 + 5*I*c^6*d - 9*c^5*
d^2 + 75*I*c^4*d^3 + 75*c^3*d^4 + 39*I*c^2*d^5 + 85*c*d^6 - 31*I*d^7)*f*x)*e^(6*I*f*x + 6*I*e) + (9*I*c^7 - 13
*c^6*d + 71*I*c^5*d^2 + 5*c^4*d^3 - 45*I*c^3*d^4 + 305*c^2*d^5 + 85*I*c*d^6 + 95*d^7 + 4*(c^7 + 7*I*c^6*d - 21
*c^5*d^2 + 45*I*c^4*d^3 - 45*c^3*d^4 + 69*I*c^2*d^5 - 23*c*d^6 + 31*I*d^7)*f*x)*e^(4*I*f*x + 4*I*e) - 2*(-3*I*
c^7 + 7*c^6*d - 9*I*c^5*d^2 + 21*c^4*d^3 - 9*I*c^3*d^4 + 21*c^2*d^5 - 3*I*c*d^6 + 7*d^7)*e^(2*I*f*x + 2*I*e) -
 32*((5*c^4*d^3 - 15*I*c^3*d^4 - 17*c^2*d^5 + 9*I*c*d^6 + 2*d^7)*e^(8*I*f*x + 8*I*e) + 2*(5*c^4*d^3 - 5*I*c^3*
d^4 + 3*c^2*d^5 - 5*I*c*d^6 - 2*d^7)*e^(6*I*f*x + 6*I*e) + (5*c^4*d^3 + 5*I*c^3*d^4 + 3*c^2*d^5 + I*c*d^6 + 2*
d^7)*e^(4*I*f*x + 4*I*e))*log(((I*c + d)*e^(2*I*f*x + 2*I*e) + I*c - d)/(I*c + d)))/((a^2*c^10 + 5*a^2*c^8*d^2
 + 10*a^2*c^6*d^4 + 10*a^2*c^4*d^6 + 5*a^2*c^2*d^8 + a^2*d^10)*f*e^(8*I*f*x + 8*I*e) + 2*(a^2*c^10 + 2*I*a^2*c
^9*d + 3*a^2*c^8*d^2 + 8*I*a^2*c^7*d^3 + 2*a^2*c^6*d^4 + 12*I*a^2*c^5*d^5 - 2*a^2*c^4*d^6 + 8*I*a^2*c^3*d^7 -
3*a^2*c^2*d^8 + 2*I*a^2*c*d^9 - a^2*d^10)*f*e^(6*I*f*x + 6*I*e) + (a^2*c^10 + 4*I*a^2*c^9*d - 3*a^2*c^8*d^2 +
8*I*a^2*c^7*d^3 - 14*a^2*c^6*d^4 - 14*a^2*c^4*d^6 - 8*I*a^2*c^3*d^7 - 3*a^2*c^2*d^8 - 4*I*a^2*c*d^9 + a^2*d^10
)*f*e^(4*I*f*x + 4*I*e))

________________________________________________________________________________________

Sympy [A]
time = 102.38, size = 1583, normalized size = 4.47 \begin {gather*} \frac {x \left (c^{2} + 8 i c d - 31 d^{2}\right )}{4 a^{2} c^{5} + 20 i a^{2} c^{4} d - 40 a^{2} c^{3} d^{2} - 40 i a^{2} c^{2} d^{3} + 20 a^{2} c d^{4} + 4 i a^{2} d^{5}} + \frac {- 10 i c^{2} d^{4} + 6 c d^{5} - 4 i d^{6} + \left (- 10 i c^{2} d^{4} e^{2 i e} - 12 c d^{5} e^{2 i e} + 2 i d^{6} e^{2 i e}\right ) e^{2 i f x}}{a^{2} c^{9} f + 3 i a^{2} c^{8} d f + 8 i a^{2} c^{6} d^{3} f - 6 a^{2} c^{5} d^{4} f + 6 i a^{2} c^{4} d^{5} f - 8 a^{2} c^{3} d^{6} f - 3 a^{2} c d^{8} f - i a^{2} d^{9} f + \left (2 a^{2} c^{9} f e^{2 i e} + 2 i a^{2} c^{8} d f e^{2 i e} + 8 a^{2} c^{7} d^{2} f e^{2 i e} + 8 i a^{2} c^{6} d^{3} f e^{2 i e} + 12 a^{2} c^{5} d^{4} f e^{2 i e} + 12 i a^{2} c^{4} d^{5} f e^{2 i e} + 8 a^{2} c^{3} d^{6} f e^{2 i e} + 8 i a^{2} c^{2} d^{7} f e^{2 i e} + 2 a^{2} c d^{8} f e^{2 i e} + 2 i a^{2} d^{9} f e^{2 i e}\right ) e^{2 i f x} + \left (a^{2} c^{9} f e^{4 i e} - i a^{2} c^{8} d f e^{4 i e} + 4 a^{2} c^{7} d^{2} f e^{4 i e} - 4 i a^{2} c^{6} d^{3} f e^{4 i e} + 6 a^{2} c^{5} d^{4} f e^{4 i e} - 6 i a^{2} c^{4} d^{5} f e^{4 i e} + 4 a^{2} c^{3} d^{6} f e^{4 i e} - 4 i a^{2} c^{2} d^{7} f e^{4 i e} + a^{2} c d^{8} f e^{4 i e} - i a^{2} d^{9} f e^{4 i e}\right ) e^{4 i f x}} + \begin {cases} \frac {\left (4 i a^{2} c^{4} f e^{2 i e} - 16 a^{2} c^{3} d f e^{2 i e} - 24 i a^{2} c^{2} d^{2} f e^{2 i e} + 16 a^{2} c d^{3} f e^{2 i e} + 4 i a^{2} d^{4} f e^{2 i e}\right ) e^{- 4 i f x} + \left (16 i a^{2} c^{4} f e^{4 i e} - 112 a^{2} c^{3} d f e^{4 i e} - 240 i a^{2} c^{2} d^{2} f e^{4 i e} + 208 a^{2} c d^{3} f e^{4 i e} + 64 i a^{2} d^{4} f e^{4 i e}\right ) e^{- 2 i f x}}{64 a^{4} c^{7} f^{2} e^{6 i e} + 448 i a^{4} c^{6} d f^{2} e^{6 i e} - 1344 a^{4} c^{5} d^{2} f^{2} e^{6 i e} - 2240 i a^{4} c^{4} d^{3} f^{2} e^{6 i e} + 2240 a^{4} c^{3} d^{4} f^{2} e^{6 i e} + 1344 i a^{4} c^{2} d^{5} f^{2} e^{6 i e} - 448 a^{4} c d^{6} f^{2} e^{6 i e} - 64 i a^{4} d^{7} f^{2} e^{6 i e}} & \text {for}\: 64 a^{4} c^{7} f^{2} e^{6 i e} + 448 i a^{4} c^{6} d f^{2} e^{6 i e} - 1344 a^{4} c^{5} d^{2} f^{2} e^{6 i e} - 2240 i a^{4} c^{4} d^{3} f^{2} e^{6 i e} + 2240 a^{4} c^{3} d^{4} f^{2} e^{6 i e} + 1344 i a^{4} c^{2} d^{5} f^{2} e^{6 i e} - 448 a^{4} c d^{6} f^{2} e^{6 i e} - 64 i a^{4} d^{7} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {c^{2} + 8 i c d - 31 d^{2}}{4 a^{2} c^{5} + 20 i a^{2} c^{4} d - 40 a^{2} c^{3} d^{2} - 40 i a^{2} c^{2} d^{3} + 20 a^{2} c d^{4} + 4 i a^{2} d^{5}} + \frac {c^{2} e^{4 i e} + 2 c^{2} e^{2 i e} + c^{2} + 8 i c d e^{4 i e} + 10 i c d e^{2 i e} + 2 i c d - 31 d^{2} e^{4 i e} - 8 d^{2} e^{2 i e} - d^{2}}{4 a^{2} c^{5} e^{4 i e} + 20 i a^{2} c^{4} d e^{4 i e} - 40 a^{2} c^{3} d^{2} e^{4 i e} - 40 i a^{2} c^{2} d^{3} e^{4 i e} + 20 a^{2} c d^{4} e^{4 i e} + 4 i a^{2} d^{5} e^{4 i e}}\right ) & \text {otherwise} \end {cases} - \frac {2 d^{3} \cdot \left (5 c^{2} - 5 i c d - 2 d^{2}\right ) \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{a^{2} f \left (c - i d\right )^{3} \left (c + i d\right )^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**2/(c+d*tan(f*x+e))**3,x)

[Out]

x*(c**2 + 8*I*c*d - 31*d**2)/(4*a**2*c**5 + 20*I*a**2*c**4*d - 40*a**2*c**3*d**2 - 40*I*a**2*c**2*d**3 + 20*a*
*2*c*d**4 + 4*I*a**2*d**5) + (-10*I*c**2*d**4 + 6*c*d**5 - 4*I*d**6 + (-10*I*c**2*d**4*exp(2*I*e) - 12*c*d**5*
exp(2*I*e) + 2*I*d**6*exp(2*I*e))*exp(2*I*f*x))/(a**2*c**9*f + 3*I*a**2*c**8*d*f + 8*I*a**2*c**6*d**3*f - 6*a*
*2*c**5*d**4*f + 6*I*a**2*c**4*d**5*f - 8*a**2*c**3*d**6*f - 3*a**2*c*d**8*f - I*a**2*d**9*f + (2*a**2*c**9*f*
exp(2*I*e) + 2*I*a**2*c**8*d*f*exp(2*I*e) + 8*a**2*c**7*d**2*f*exp(2*I*e) + 8*I*a**2*c**6*d**3*f*exp(2*I*e) +
12*a**2*c**5*d**4*f*exp(2*I*e) + 12*I*a**2*c**4*d**5*f*exp(2*I*e) + 8*a**2*c**3*d**6*f*exp(2*I*e) + 8*I*a**2*c
**2*d**7*f*exp(2*I*e) + 2*a**2*c*d**8*f*exp(2*I*e) + 2*I*a**2*d**9*f*exp(2*I*e))*exp(2*I*f*x) + (a**2*c**9*f*e
xp(4*I*e) - I*a**2*c**8*d*f*exp(4*I*e) + 4*a**2*c**7*d**2*f*exp(4*I*e) - 4*I*a**2*c**6*d**3*f*exp(4*I*e) + 6*a
**2*c**5*d**4*f*exp(4*I*e) - 6*I*a**2*c**4*d**5*f*exp(4*I*e) + 4*a**2*c**3*d**6*f*exp(4*I*e) - 4*I*a**2*c**2*d
**7*f*exp(4*I*e) + a**2*c*d**8*f*exp(4*I*e) - I*a**2*d**9*f*exp(4*I*e))*exp(4*I*f*x)) + Piecewise((((4*I*a**2*
c**4*f*exp(2*I*e) - 16*a**2*c**3*d*f*exp(2*I*e) - 24*I*a**2*c**2*d**2*f*exp(2*I*e) + 16*a**2*c*d**3*f*exp(2*I*
e) + 4*I*a**2*d**4*f*exp(2*I*e))*exp(-4*I*f*x) + (16*I*a**2*c**4*f*exp(4*I*e) - 112*a**2*c**3*d*f*exp(4*I*e) -
 240*I*a**2*c**2*d**2*f*exp(4*I*e) + 208*a**2*c*d**3*f*exp(4*I*e) + 64*I*a**2*d**4*f*exp(4*I*e))*exp(-2*I*f*x)
)/(64*a**4*c**7*f**2*exp(6*I*e) + 448*I*a**4*c**6*d*f**2*exp(6*I*e) - 1344*a**4*c**5*d**2*f**2*exp(6*I*e) - 22
40*I*a**4*c**4*d**3*f**2*exp(6*I*e) + 2240*a**4*c**3*d**4*f**2*exp(6*I*e) + 1344*I*a**4*c**2*d**5*f**2*exp(6*I
*e) - 448*a**4*c*d**6*f**2*exp(6*I*e) - 64*I*a**4*d**7*f**2*exp(6*I*e)), Ne(64*a**4*c**7*f**2*exp(6*I*e) + 448
*I*a**4*c**6*d*f**2*exp(6*I*e) - 1344*a**4*c**5*d**2*f**2*exp(6*I*e) - 2240*I*a**4*c**4*d**3*f**2*exp(6*I*e) +
 2240*a**4*c**3*d**4*f**2*exp(6*I*e) + 1344*I*a**4*c**2*d**5*f**2*exp(6*I*e) - 448*a**4*c*d**6*f**2*exp(6*I*e)
 - 64*I*a**4*d**7*f**2*exp(6*I*e), 0)), (x*(-(c**2 + 8*I*c*d - 31*d**2)/(4*a**2*c**5 + 20*I*a**2*c**4*d - 40*a
**2*c**3*d**2 - 40*I*a**2*c**2*d**3 + 20*a**2*c*d**4 + 4*I*a**2*d**5) + (c**2*exp(4*I*e) + 2*c**2*exp(2*I*e) +
 c**2 + 8*I*c*d*exp(4*I*e) + 10*I*c*d*exp(2*I*e) + 2*I*c*d - 31*d**2*exp(4*I*e) - 8*d**2*exp(2*I*e) - d**2)/(4
*a**2*c**5*exp(4*I*e) + 20*I*a**2*c**4*d*exp(4*I*e) - 40*a**2*c**3*d**2*exp(4*I*e) - 40*I*a**2*c**2*d**3*exp(4
*I*e) + 20*a**2*c*d**4*exp(4*I*e) + 4*I*a**2*d**5*exp(4*I*e))), True)) - 2*d**3*(5*c**2 - 5*I*c*d - 2*d**2)*lo
g((c + I*d)/(c*exp(2*I*e) - I*d*exp(2*I*e)) + exp(2*I*f*x))/(a**2*f*(c - I*d)**3*(c + I*d)**5)

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 806 vs. \(2 (312) = 624\).
time = 0.83, size = 806, normalized size = 2.28 \begin {gather*} -\frac {\frac {16 \, {\left (5 \, c^{2} d^{4} - 5 i \, c d^{5} - 2 \, d^{6}\right )} \log \left (i \, d \tan \left (f x + e\right ) + i \, c\right )}{a^{2} c^{8} d + 2 i \, a^{2} c^{7} d^{2} + 2 \, a^{2} c^{6} d^{3} + 6 i \, a^{2} c^{5} d^{4} + 6 i \, a^{2} c^{3} d^{6} - 2 \, a^{2} c^{2} d^{7} + 2 i \, a^{2} c d^{8} - a^{2} d^{9}} + \frac {{\left (i \, c^{2} - 8 \, c d - 31 i \, d^{2}\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{2} c^{5} + 5 i \, a^{2} c^{4} d - 10 \, a^{2} c^{3} d^{2} - 10 i \, a^{2} c^{2} d^{3} + 5 \, a^{2} c d^{4} + i \, a^{2} d^{5}} + \frac {16 \, \log \left (-i \, \tan \left (f x + e\right ) + 1\right )}{16 i \, a^{2} c^{3} + 48 \, a^{2} c^{2} d - 48 i \, a^{2} c d^{2} - 16 \, a^{2} d^{3}} - \frac {16 \, {\left (3 \, c^{4} d^{2} \tan \left (f x + e\right )^{4} + 12 i \, c^{3} d^{3} \tan \left (f x + e\right )^{4} - 18 \, c^{2} d^{4} \tan \left (f x + e\right )^{4} - 12 i \, c d^{5} \tan \left (f x + e\right )^{4} + 3 \, d^{6} \tan \left (f x + e\right )^{4} + 6 \, c^{5} d \tan \left (f x + e\right )^{3} + 10 i \, c^{4} d^{2} \tan \left (f x + e\right )^{3} + 20 \, c^{3} d^{3} \tan \left (f x + e\right )^{3} - 260 i \, c^{2} d^{4} \tan \left (f x + e\right )^{3} - 370 \, c d^{5} \tan \left (f x + e\right )^{3} + 114 i \, d^{6} \tan \left (f x + e\right )^{3} + 3 \, c^{6} \tan \left (f x + e\right )^{2} - 16 i \, c^{5} d \tan \left (f x + e\right )^{2} + 75 \, c^{4} d^{2} \tan \left (f x + e\right )^{2} - 400 i \, c^{3} d^{3} \tan \left (f x + e\right )^{2} - 955 \, c^{2} d^{4} \tan \left (f x + e\right )^{2} + 720 i \, c d^{5} \tan \left (f x + e\right )^{2} + 173 \, d^{6} \tan \left (f x + e\right )^{2} - 14 i \, c^{6} \tan \left (f x + e\right ) + 18 \, c^{5} d \tan \left (f x + e\right ) - 164 i \, c^{4} d^{2} \tan \left (f x + e\right ) - 724 \, c^{3} d^{3} \tan \left (f x + e\right ) + 970 i \, c^{2} d^{4} \tan \left (f x + e\right ) + 410 \, c d^{5} \tan \left (f x + e\right ) - 32 i \, d^{6} \tan \left (f x + e\right ) - 19 \, c^{6} - 28 i \, c^{5} d - 126 \, c^{4} d^{2} + 332 i \, c^{3} d^{3} + 269 \, c^{2} d^{4} - 48 i \, c d^{5} + 16 \, d^{6}\right )}}{-64 \, {\left (i \, a^{2} c^{7} - a^{2} c^{6} d + 3 i \, a^{2} c^{5} d^{2} - 3 \, a^{2} c^{4} d^{3} + 3 i \, a^{2} c^{3} d^{4} - 3 \, a^{2} c^{2} d^{5} + i \, a^{2} c d^{6} - a^{2} d^{7}\right )} {\left (d \tan \left (f x + e\right )^{2} + c \tan \left (f x + e\right ) - i \, d \tan \left (f x + e\right ) - i \, c\right )}^{2}}}{8 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^3,x, algorithm="giac")

[Out]

-1/8*(16*(5*c^2*d^4 - 5*I*c*d^5 - 2*d^6)*log(I*d*tan(f*x + e) + I*c)/(a^2*c^8*d + 2*I*a^2*c^7*d^2 + 2*a^2*c^6*
d^3 + 6*I*a^2*c^5*d^4 + 6*I*a^2*c^3*d^6 - 2*a^2*c^2*d^7 + 2*I*a^2*c*d^8 - a^2*d^9) + (I*c^2 - 8*c*d - 31*I*d^2
)*log(tan(f*x + e) - I)/(a^2*c^5 + 5*I*a^2*c^4*d - 10*a^2*c^3*d^2 - 10*I*a^2*c^2*d^3 + 5*a^2*c*d^4 + I*a^2*d^5
) + 16*log(-I*tan(f*x + e) + 1)/(16*I*a^2*c^3 + 48*a^2*c^2*d - 48*I*a^2*c*d^2 - 16*a^2*d^3) - 16*(3*c^4*d^2*ta
n(f*x + e)^4 + 12*I*c^3*d^3*tan(f*x + e)^4 - 18*c^2*d^4*tan(f*x + e)^4 - 12*I*c*d^5*tan(f*x + e)^4 + 3*d^6*tan
(f*x + e)^4 + 6*c^5*d*tan(f*x + e)^3 + 10*I*c^4*d^2*tan(f*x + e)^3 + 20*c^3*d^3*tan(f*x + e)^3 - 260*I*c^2*d^4
*tan(f*x + e)^3 - 370*c*d^5*tan(f*x + e)^3 + 114*I*d^6*tan(f*x + e)^3 + 3*c^6*tan(f*x + e)^2 - 16*I*c^5*d*tan(
f*x + e)^2 + 75*c^4*d^2*tan(f*x + e)^2 - 400*I*c^3*d^3*tan(f*x + e)^2 - 955*c^2*d^4*tan(f*x + e)^2 + 720*I*c*d
^5*tan(f*x + e)^2 + 173*d^6*tan(f*x + e)^2 - 14*I*c^6*tan(f*x + e) + 18*c^5*d*tan(f*x + e) - 164*I*c^4*d^2*tan
(f*x + e) - 724*c^3*d^3*tan(f*x + e) + 970*I*c^2*d^4*tan(f*x + e) + 410*c*d^5*tan(f*x + e) - 32*I*d^6*tan(f*x
+ e) - 19*c^6 - 28*I*c^5*d - 126*c^4*d^2 + 332*I*c^3*d^3 + 269*c^2*d^4 - 48*I*c*d^5 + 16*d^6)/((-64*I*a^2*c^7
+ 64*a^2*c^6*d - 192*I*a^2*c^5*d^2 + 192*a^2*c^4*d^3 - 192*I*a^2*c^3*d^4 + 192*a^2*c^2*d^5 - 64*I*a^2*c*d^6 +
64*a^2*d^7)*(d*tan(f*x + e)^2 + c*tan(f*x + e) - I*d*tan(f*x + e) - I*c)^2))/f

________________________________________________________________________________________

Mupad [B]
time = 12.08, size = 2640, normalized size = 7.46 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*tan(e + f*x)*1i)^2*(c + d*tan(e + f*x))^3),x)

[Out]

symsum(log((a^2*d^6 + a^2*c*d^5*4i - 6*a^2*c^2*d^4 - a^2*c^3*d^3*4i + a^2*c^4*d^2)*(839*c*d^7 + c^7*d - d^8*24
0i + c^2*d^6*970i - 353*c^3*d^5 + c^4*d^4*100i - 7*c^5*d^3 + c^6*d^2*10i) - root(5760*a^6*c^8*d^8*e^3 + 4096*a
^6*c^10*d^6*e^3 + 4096*a^6*c^6*d^10*e^3 - a^6*c^11*d^5*e^3*2304i + a^6*c^5*d^11*e^3*2304i - a^6*c^13*d^3*e^3*1
280i - a^6*c^9*d^7*e^3*1280i + a^6*c^7*d^9*e^3*1280i + a^6*c^3*d^13*e^3*1280i + 1280*a^6*c^12*d^4*e^3 + 1280*a
^6*c^4*d^12*e^3 - a^6*c^15*d*e^3*256i + a^6*c*d^15*e^3*256i - 64*a^6*d^16*e^3 - 64*a^6*c^16*e^3 + a^2*c*d^9*e*
5190i - a^2*c^9*d*e*10i - a^2*c^3*d^7*e*12600i - 11565*a^2*c^2*d^8*e + 6450*a^2*c^4*d^6*e + a^2*c^5*d^5*e*180i
 + 110*a^2*c^6*d^4*e + a^2*c^7*d^3*e*40i + 45*a^2*c^8*d^2*e + 993*a^2*d^10*e - a^2*c^10*e + 234*c^2*d^5 - c^3*
d^4*70i - 10*c^4*d^3 - c*d^6*278i - 124*d^7, e, k)*(root(5760*a^6*c^8*d^8*e^3 + 4096*a^6*c^10*d^6*e^3 + 4096*a
^6*c^6*d^10*e^3 - a^6*c^11*d^5*e^3*2304i + a^6*c^5*d^11*e^3*2304i - a^6*c^13*d^3*e^3*1280i - a^6*c^9*d^7*e^3*1
280i + a^6*c^7*d^9*e^3*1280i + a^6*c^3*d^13*e^3*1280i + 1280*a^6*c^12*d^4*e^3 + 1280*a^6*c^4*d^12*e^3 - a^6*c^
15*d*e^3*256i + a^6*c*d^15*e^3*256i - 64*a^6*d^16*e^3 - 64*a^6*c^16*e^3 + a^2*c*d^9*e*5190i - a^2*c^9*d*e*10i
- a^2*c^3*d^7*e*12600i - 11565*a^2*c^2*d^8*e + 6450*a^2*c^4*d^6*e + a^2*c^5*d^5*e*180i + 110*a^2*c^6*d^4*e + a
^2*c^7*d^3*e*40i + 45*a^2*c^8*d^2*e + 993*a^2*d^10*e - a^2*c^10*e + 234*c^2*d^5 - c^3*d^4*70i - 10*c^4*d^3 - c
*d^6*278i - 124*d^7, e, k)*((a^2*d^6 + a^2*c*d^5*4i - 6*a^2*c^2*d^4 - a^2*c^3*d^3*4i + a^2*c^4*d^2)*(a^4*c^2*d
^12*512i - 128*a^4*c^13*d - 128*a^4*c*d^13 + 256*a^4*c^3*d^11 + a^4*c^4*d^10*1536i + 2176*a^4*c^5*d^9 + a^4*c^
6*d^8*1024i + 3584*a^4*c^7*d^7 - a^4*c^8*d^6*1024i + 2176*a^4*c^9*d^5 - a^4*c^10*d^4*1536i + 256*a^4*c^11*d^3
- a^4*c^12*d^2*512i) + tan(e + f*x)*(a^2*d^6 + a^2*c*d^5*4i - 6*a^2*c^2*d^4 - a^2*c^3*d^3*4i + a^2*c^4*d^2)*(3
2*a^4*c^14 - 96*a^4*d^14 + a^4*c*d^13*384i + a^4*c^13*d*128i + 224*a^4*c^2*d^12 + a^4*c^3*d^11*1024i + 1568*a^
4*c^4*d^10 + a^4*c^5*d^9*384i + 2144*a^4*c^6*d^8 - a^4*c^7*d^7*1024i + 736*a^4*c^8*d^6 - a^4*c^9*d^5*896i - 35
2*a^4*c^10*d^4 - 160*a^4*c^12*d^2)) + (a^2*d^6 + a^2*c*d^5*4i - 6*a^2*c^2*d^4 - a^2*c^3*d^3*4i + a^2*c^4*d^2)*
(a^2*d^11*60i - 4*a^2*c^11 + 68*a^2*c*d^10 - a^2*c^10*d*28i + a^2*c^2*d^9*244i + 300*a^2*c^3*d^8 + a^2*c^4*d^7
*344i + 488*a^2*c^5*d^6 + a^2*c^6*d^5*168i + 344*a^2*c^7*d^4 - a^2*c^8*d^3*20i + 84*a^2*c^9*d^2) + tan(e + f*x
)*(a^2*d^6 + a^2*c*d^5*4i - 6*a^2*c^2*d^4 - a^2*c^3*d^3*4i + a^2*c^4*d^2)*(192*a^2*d^11 - a^2*c*d^10*24i - 8*a
^2*c^10*d + 664*a^2*c^2*d^9 + a^2*c^3*d^8*128i + 1088*a^2*c^4*d^7 + a^2*c^5*d^6*272i + 944*a^2*c^6*d^5 + a^2*c
^7*d^4*64i + 320*a^2*c^8*d^3 - a^2*c^9*d^2*56i)) + tan(e + f*x)*(a^2*d^6 + a^2*c*d^5*4i - 6*a^2*c^2*d^4 - a^2*
c^3*d^3*4i + a^2*c^4*d^2)*(991*c^2*d^6 - 225*d^8 - c*d^7*870i + c^3*d^5*260i + 33*c^4*d^4 + c^5*d^3*10i + c^6*
d^2))*root(5760*a^6*c^8*d^8*e^3 + 4096*a^6*c^10*d^6*e^3 + 4096*a^6*c^6*d^10*e^3 - a^6*c^11*d^5*e^3*2304i + a^6
*c^5*d^11*e^3*2304i - a^6*c^13*d^3*e^3*1280i - a^6*c^9*d^7*e^3*1280i + a^6*c^7*d^9*e^3*1280i + a^6*c^3*d^13*e^
3*1280i + 1280*a^6*c^12*d^4*e^3 + 1280*a^6*c^4*d^12*e^3 - a^6*c^15*d*e^3*256i + a^6*c*d^15*e^3*256i - 64*a^6*d
^16*e^3 - 64*a^6*c^16*e^3 + a^2*c*d^9*e*5190i - a^2*c^9*d*e*10i - a^2*c^3*d^7*e*12600i - 11565*a^2*c^2*d^8*e +
 6450*a^2*c^4*d^6*e + a^2*c^5*d^5*e*180i + 110*a^2*c^6*d^4*e + a^2*c^7*d^3*e*40i + 45*a^2*c^8*d^2*e + 993*a^2*
d^10*e - a^2*c^10*e + 234*c^2*d^5 - c^3*d^4*70i - 10*c^4*d^3 - c*d^6*278i - 124*d^7, e, k), k, 1, 3)/f - ((tan
(e + f*x)^3*(29*c*d^2 + c^2*d*5i + c^3 - d^3*15i)*1i)/(4*a^2*(2*c*d^5 + 2*c^5*d - c^6*1i + d^6*1i + c^2*d^4*1i
 + 4*c^3*d^3 - c^4*d^2*1i)) - ((c^5*8i - 16*c^4*d - c*d^4*32i + 8*d^5 + 104*c^2*d^3 + c^3*d^2*56i)*1i)/(16*a^2
*d^2*(2*c*d^5 + 2*c^5*d - c^6*1i + d^6*1i + c^2*d^4*1i + 4*c^3*d^3 - c^4*d^2*1i)) + (tan(e + f*x)^2*(c^3*d*16i
 - c*d^3*136i + 4*c^4 - 44*d^4 + 96*c^2*d^2)*1i)/(8*a^2*d*(2*c*d^5 + 2*c^5*d - c^6*1i + d^6*1i + c^2*d^4*1i +
4*c^3*d^3 - c^4*d^2*1i)) + (tan(e + f*x)*(c^4*d*3i - 144*c*d^4 + 3*c^5 + d^5*12i - c^2*d^3*213i + 63*c^3*d^2)*
1i)/(12*a^2*d^2*(2*c*d^5 + 2*c^5*d - c^6*1i + d^6*1i + c^2*d^4*1i + 4*c^3*d^3 - c^4*d^2*1i)))/(f*(tan(e + f*x)
^3*((2*c)/d - 2i) + tan(e + f*x)^2*((c^2 - d^2)/d^2 - (c*4i)/d) - tan(e + f*x)*((2*c)/d + (c^2*2i)/d^2) + tan(
e + f*x)^4 - c^2/d^2))

________________________________________________________________________________________